package miage.gestioncabinet.corem;

import java.util.Calendar;

import miage.gestioncabinet.api.Patient;

public class PatientM extends PersonneM implements Patient{

	/**
	 * 
	 */
	private static final long serialVersionUID = 2684950790652751108L;

	private String sexe;
	private Calendar dateNaissance;
	
	@Override
	public String getNom() {
		return this.nom;
	}

	@Override
	public void setNom(String nom) {
		this.nom = nom;
	}

	@Override
	public String getPrenom() {
		return this.prenom;
	}

	@Override
	public void setPrenom(String prenom) {
		this.prenom = prenom;
	}

	@Override
	public Calendar getDateNaissance() {	
		return this.dateNaissance;
	}

	@Override
	public void setDateNaissance(Calendar dateNaissance) {	
		this.dateNaissance = dateNaissance;
	}

	@Override
	public Integer getAge() {
		Calendar today = Calendar.getInstance();
		return today.get(Calendar.YEAR) - this.dateNaissance.get(Calendar.YEAR); 
	}

	@Override
	public String getSexe() {
		return this.sexe;
	}

}
